import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: () => import('../components/login')
    },
    {
      path: '/teacher/detail',
      name: 'teacherDetail',
      component: () => import('../components/teacher/teacherDetail')
    },
    {
      path: '/teacher/course',
      name: 'courseDetail',
      component: () => import('../components/teacher/courseDetail')
    },
    {
      path: '/student/detail',
      name: 'studentDetail',
      component: () => import('../components/student/studentDetail')
    },
    {
      path: '/student/course',
      name: 'studentCourse',
      component: () => import('../components/student/courseDetail')
    },
    {
      path: '/student/cost',
      name: 'studentCost',
      component: () => import('../components/student/costRecord')
    },
    {
      path: '/index/message',
      name: 'message',
      component: () => import('../components/index/message')
    },
    {
      path: '/index/about',
      name: 'about',
      component: () => import('../components/index/about')
    },
    {
      path: '/index',
      name: 'index',
      component: () => import('../components/index')
    },
    {
      path: '/my',
      name: 'my',
      component: () => import('../components/index/my')
    },
    {
      path: '/list/:type',
      name: 'list',
      component: () => import('../components/index/list')
    }
  ]
})
